package com.xu.demo.filterPattern;

import java.util.List;

/**
 * 过滤出性别为男的同学
 */
public class NameFilter implements IFilter {

    @Override
    public List<Person> filterOperate(List<Person> personList) {
        return personList.stream().filter(person ->
                person.getName().startsWith("J")).toList();
    }
}